package editor;

import java.awt.Color;

import javax.swing.JTextArea;


@SuppressWarnings("serial")
public class CaptionTextArea extends JTextArea
{
	private String selected;
	private String string;
	
	public CaptionTextArea()
	{		
		selected = "Blue";
		setCaptionText("Blue");
		
		this.setLineWrap(true);
		
		this.setBackground(Color.black);
		this.setEditable(false);
		this.setForeground(Color.white);
	}
	
	public void setCaptionText(String s)
	{
		string = s;
		
		if(string == "Blue")
		{
			string = string + ": a Wall.";
		}
		else if(string == "Black")
		{
			string = string + ": Blank Space, nothing special.";
		}
		else if(string == "Red")
		{
			string = string + ": The snake moves faster while traveling over Red space.";
		}
		else if(string == "Gray")
		{
			string = string + ": The snake moves slower while traveling over Gray spaces.";
		}
		else if(string == "Green")
		{
			string = string + ": Green spaces will have mice on them.  If there is no green on your map, mice will be placed randomly.";
		}
		else if(string == "Brown")
		{
			string = string + ": Makes the snake shorter as it travels across these blocks.";
		}
		else if(string == "Cyan")
		{
			string = string + ": The snake's controls are mirrored while on these blocks.";
		}
		else if (string == "Test")
		{
			string = string + " your current map";
		}
		else if(string == "Save")
		{
			string = string + " your current map";
		}
		else if(string == "Menu")
		{
			string = string + ": Return to the main Menu";
		}
		this.setText(string);
	}
	
	


	public void setSelected(String s)
	{
		selected = s;
	}
	public void setVoid()
	{
		setCaptionText(selected);
	}
}